package com.zxcl.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zxcl.domain.SysLog;
import com.zxcl.dto.PageDTO;
import com.zxcl.model.Result;
import com.zxcl.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("sys/log")
@RestController
@Api(tags = "系统日志相关模块")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;
    /**
     * 系统日志分页查询
     */
    @GetMapping("page")
    @ApiOperation("系统日志分页查询")
    public Result<Page<SysLog>> loadSysLogPage(PageDTO pageDTO, SysLog sysLog){
        Page<SysLog> sysLogPage = sysLogService.loadSysLogPage(pageDTO, sysLog);
        return Result.success(sysLogPage);
    }
}